<template>
  <div class="welcome">
    <van-button class="btn" round block type="primary" to="/mobilelogin">
      跳过广告{{ time }}
    </van-button>
  </div>
</template>

<script setup>
const $router = useRouter()
const time = ref(3)
let timer = setInterval(() => {
  time.value = time.value - 1
  if (time.value <= 0) {
    clearInterval(timer)
    timer = null
    $router.push({ path: "/mobilelogin" })
  }
}, 1000)
</script>

<style scoped>
.welcome {
  height: 100vh;
  width: 100vw;
  background-image: url("../../images/01.JPG");
}
.btn {
  position: absolute;
  right: 10px;
  top: 35px;
  width: 100px;
  background-color: rgb(221, 221, 244, 0.3);
}
</style>
